  
<include file="Public/header" />
   <link rel="stylesheet" href="__ROOT__/public/home/css/per-att.css">

    <section class="sign sue">
        <div class="center-element clear">
 

            <!-- 右边 -->
           <article class="per-cont" style="width: 100%">
                <div class="title">
                    <span>起诉</span>
                </div>
                <div class="cont-att">
                
                    <form action="{:U('Event/ToSue')}" enctype="multipart/form-data" method="post">
                        <span>起诉书：</span>
                        <input  type="hidden" name="event_id" value="{$id}">
                        <input id="lefile" type="file" name="photo" style="display:none">
                        <div class="input-append">
                            <input id="photoCover" class="input-large " type="text">
                            <span class="file-click hidden-xs">上传</span>
                        </div>
                        <p>（起诉书请压缩上传，格式为zip或者rar）</p>
                        <input id="sub" type="submit" value="提交">
     
                    </form>
                   
                </div>
            </article>
        </div>

    </section>
    <include file="Public/footer" />
    <script>
        $(function () {

            $(".file-click").click(function () {
                $('#lefile').click();
            });

            $('#lefile').change(function () {
                $('#photoCover').val($(this).val());

            })


        })
   $("#sub").click(function () {  
                var file = $("#lefile").val();  
                if (file == "") {  
                    alert("请选择要上传的文件");  
                    return false  
                } else {  
                    //检验文件类型是否正确  
                    var exec = (/[.]/.exec(file)) ? /[^.]+$/.exec(file.toLowerCase()) : '';  
                    if (exec != "rar" && exec != "zip") {  
                        alert("文件格式不对，请上传压缩文件!");  
                        return false;  
                    }  
                }  
                return true;  
            }); 
    </script>